<?php

namespace App\Http\Controllers\Mini\Estate;

use App\Http\Controllers\Controller;
use App\Http\Requests\Mini\Estate\PayRequest;
use App\Services\WechatPayService;

class PayController extends Controller
{

    protected $service;

    public function __construct(WechatPayService $payService)
    {
        $this->service = $payService;
    }


    public function pay(PayRequest $request)
    {
        $param = $request->all();
        $result = $this->service->estatePay($param);
        return $result['status'] ? $this->success($result['data'], $result['msg']) : $this->error($result['msg']);
    }
}
